<?php
/**
 * Joomla! 1.5 component ArticleCashRewards
 *
 * @version $Id: dashboard.php 2009-05-10 01:47:01 svn $
 * @author Maverick
 * @package Joomla
 * @subpackage components.views.mypage.tmpl
 * @link http://joomladev.boddunan.com
 * @license GNU/GPL
 *
 * Review and approve the articles and assign points and cash rewards.
 * Users can see their articles and the points/cash rewards assigned in the front-end module.
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
include('tabs.php');
?>
<div class="current"><dd style="display: block;">
<form action="index.php?option=com_articlecashrewards&controller=mypage&task=saveprofile" method="post" name="adminForm">
<table class="noshow" width="100%">
    <tr>
        <td>
            <span class="sectionTitle"><?php echo JText::_('LABEL_DBD_ARTICLES');?></span>
        </td>
    </tr>
    <tr>
        <td>
            <table class="acrtable">
                <tr>
                    <td class="key">
                        <?php echo JText::_('LABEL_DBD_CASH_REWARDS'); ?>
                    </td>
                    <td>
                        <?php echo $this->dashboard->article_cash; ?>
                    </td>
                </tr>
                <?php if($this->acr_config[CONFIG_ENABLE_POINTS] == '1' && $this->acr_config[CONFIG_POINTS_SYSTEM] != POINTS_SYSTEM_JOMSOCIAL){?>
                <tr>
                    <td class="key">
                        <?php echo JText::_('LABEL_DBD_CASH_POINTS'); ?>
                    </td>
                    <td>
                        <?php echo $this->dashboard->article_points; ?>
                    </td>
                </tr>
                <?php } ?>
                <tr>
                    <td class="key">
                        <?php echo JText::_('LABEL_DBD_ARTICLE_COUNT'); ?>
                    </td>
                    <td>
                        <?php echo $this->dashboard->article_count; ?>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <?php if($this->acr_config[CONFIG_ENABLE_WEBLINKS] == '1'){?>
    <tr>
        <td>
            <span class="sectionTitle"><?php echo JText::_('LABEL_DBD_WEBLINKS');?></span>
        </td>
    </tr>
    <tr>
        <td>
            <table class="acrtable">
                <tr>
                    <td class="key">
                        <?php echo JText::_('LABEL_DBD_CASH_REWARDS'); ?>
                    </td>
                    <td>
                        <?php echo $this->dashboard->weblinks_amount; ?>
                    </td>
                </tr>
                <tr>
                    <td class="key">
                        <?php echo JText::_('LABEL_DBD_WEBLINKS_COUNT'); ?>
                    </td>
                    <td>
                        <?php echo $this->dashboard->weblinks_count; ?>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <?php } ?>
    <?php if($this->acr_config[CONFIG_ENABLE_REFERRALS] == '1'){?>
    <tr>
        <td>
            <span class="sectionTitle"><?php echo JText::_('LABEL_DBD_REFERRALS');?></span>
        </td>
    </tr>
    <tr>
        <td>
            <table class="acrtable">
                <tr>
                    <td class="key">
                        <?php echo JText::_('LABEL_DBD_CASH_REWARDS'); ?>
                    </td>
                    <td>
                        <?php echo $this->dashboard->referral_amount; ?>
                    </td>
                </tr>
                <tr>
                    <td class="key">
                        <?php echo JText::_('LABEL_DBD_REFERRALS_COUNT'); ?>
                    </td>
                    <td>
                        <?php echo $this->dashboard->referral_count; ?>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <?php } ?>
    <?php if($this->acr_config[CONFIG_ENABLE_AWARDS] == '1'){?>
    <tr>
        <td valign="top">
            <span class="sectionTitle"><?php echo JText::_('LABEL_DBD_AWARDS');?></span>
        </td>
    </tr>
    <?php if($this->dashboard->awards){ ?>
    <tr>
        <td valign="top">
            <table border="0" cellspacing="0" cellpadding="0" width="100%">
                <thead>
                    <tr>
                        <th><div align="left"><?php echo JText::_('LABEL_AWARD'); ?></div></th>
                        <th><div align="left"><?php echo JText::_('LABEL_DESCRIPTION'); ?></div></th>
                        <th><div align="left"><?php echo JText::_('LABEL_AMOUNT'); ?></div></th>
                        <th><div align="left"><?php echo JText::_('LABEL_AWARD_DATE'); ?></div></th>
                    </tr>
                </thead>
                <tbody>
                <?php
                    $i = 1;
                    foreach ($this->dashboard->awards as $award) {
                    ?>
                    <tr>
                        <td><?php echo $award->award; ?></td>
                        <td><?php echo $award->description; ?></td>
                        <td><?php echo $award->amount; ?></td>
                        <td><?php echo $award->award_date; ?></td>
                    </tr>
                <?php
                    $i++;
                    }
                ?>
                </tbody>
            </table>
        </td>
    </tr>
    <?php
    }else{
        echo '<tr><td>' . JText::_('MSG_NO_AWARDS'). '</td></tr>';
    }
    }
    ?>
    <tr>
        <td>
            <span class="sectionTitle"><?php echo JText::_('LABEL_DBD_TOTALS');?></span>
        </td>
    </tr>
    <tr>
        <td>
            <table class="acrtable">
                <tr>
                    <td class="key">
                        <?php echo JText::_('LABEL_TOT_CASH'); ?>
                    </td>
                    <td>
                        <?php echo $this->dashboard->total_cash; ?>
                    </td>
                </tr>
                <?php if($this->acr_config[CONFIG_ENABLE_POINTS] == '1' && $this->acr_config[CONFIG_POINTS_SYSTEM] != POINTS_SYSTEM_JOMSOCIAL){?>
                <tr>
                    <td class="key">
                        <?php echo JText::_('LABEL_TOT_POINTS'); ?>
                    </td>
                    <td>
                        <?php echo $this->dashboard->total_points; ?>
                    </td>
                </tr>
                <?php } ?>
                <tr>
                    <td class="key">
                        <?php echo JText::_('LABEL_DBD_CASH'); ?>
                    </td>
                    <td>
                        <?php echo $this->dashboard->total_paid; ?>
                    </td>
                </tr>
                <tr>
                    <td class="key">
                        <?php echo JText::_('LABEL_DBD_REDEEMED'); ?>
                    </td>
                    <td>
                        <?php echo $this->dashboard->total_redeamed; ?>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td align="center" nowrap="nowrap">
            <div style="font-size: 9px;;">
            Article Cash Rewards powered by <a href="http://boddunan.com">boddunan.com</a>
            </div>
        </td>
    </tr>
</table>
</form>
</dd></div>